import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/auth/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/api/auth/userinfo',
    method: 'post',
    data: token
  })
}

export function fetchList(page, size, name) {
  return request({
    url: `/api/auth/list/${page}/${size}?name=${name}`,
    method: 'post'
  })
}

export function getUserInfoIndex() {
  return request({
    url: `/api/auth/userOtherInfo`,
    method: 'post'
  })
}

export function getPostedInfoIndex() {
  return request({
    url: `/api/auth/postedOtherInfo`,
    method: 'post'
  })
}
